package com.zzq.enumerate;

import lombok.Getter;

public enum RedisKeyEnum {
    /**
     * 绑定用户id
     */
    SMILE_CLIENT_LOGIN("客户端用户","CLIENT_USER_LOGIN","SMILE:CLIENT:LOGIN"),
    /**
     * 绑定摄影师id
     */
    SMILE_PHOTOGRAPHER_LOGIN("摄影师端用户","CLIENT_USER_LOGIN","SMILE:PHOTOGRAPHER:LOGIN"),
    SMILE_ACCESSTOKEN("微信的accessToken","SMILE_ACCESSTOKEN","SMILE:ACCESSTOKEN"),

    SMILE_PRICEPHOTO_UPLOAD("分片上传","SMILE_PRICEPHOTO_UPLOAD","SMILE:PRICEPHOTO:UPLOAD"),

    SMILE_MEITU_MSGS_ALBUM("美图api相册msg","SMILE_MEITU_MSGS_ALBUM","SMILE:MEITU:MSGS:ALBUM");
    @Getter
    private String describe;
    @Getter
    private String name;

    private String key;

    public String key(){
        return this.key;
    }
    public String key(Long sno){
        return  key(String.valueOf(sno));
    }
    public String key(String sno){
        return this.key+":"+sno;
    }

    RedisKeyEnum(String describe, String name,String key) {
        this.describe = describe;
        this.name = name;
        this.key=key;
    }
}
